﻿@{
    ViewBag.Title = "选择零件";
    Layout = "~/Views/Shared/_ManufactureList.cshtml";
}
<script type="text/javascript">
    $(function () {
        initControl();
        gridList();
    });
    function initControl() {
        $('select').bindSelect();
    }
    function gridList() {
        var $gridList = $("#gridList");
        $gridList.dataGrid({
            url: "/VBaseData/V_ZSJ_12_GH_SuProduction_DatStorKW/SelectPart",
            height:  340,
            colModel: [
            { label: '零件编号', name: 'FProductionNO', width: 120, align: 'left' },
            { label: '零件名称', name: 'FProductionName', width: 120, align: 'left' },
            { label: '零件分类编码', name: 'FProductionTypeNO', width: 120, align: 'left' },
            { label: '容器编号', name: 'FContainerNO', width: 60, align: 'left' },
            { label: '容器名称', name: 'FContainerName', width: 80, align: 'left' },
            { label: '容器数量', name: 'FContainerQuantity', width: 80, align: 'left' },
            { label: '标准装箱', name: 'Fcontent', width: 60, align: 'left' },
            { label: '实际装箱', name: 'FFactContent', width: 60, align: 'left' },
            { label: '制造单位', name: 'FProCompanyNO', width: 100, align: 'left' },
            { label: '制造单位名称', name: 'FProCompanyName', width: 120, align: 'left' },
            ]
        });
        $("#btn_search").click(function () {
            $gridList.jqGrid('setGridParam', {
                postData: { keyword: $("#F_ItemCode").val() },
            }).trigger('reloadGrid');
        });
    }

    function GetDataValue() {
        return $("#gridList").jqGridRowValue();
        
    }
</script>
<div id="layout" style="height: 80%; width: 100%;">
    <table class="form">
        <tr>
            <th class="formTitle">请输入零件编号</th>
            <td class="formValue">
                <input id="F_ItemCode" name="F_ItemCode" type="text" class="form-control required" style="margin-left:30px; width:220px;" placeholder="请输入零件编号" />

                <div class="btn-group" style="margin-left:20px;">
                    <a id="btn_search" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-ok"></span> 查询</a>
                </div>
            </td>
        </tr>
    </table>
    <div style="">
        <table id="gridList"></table>
    </div>
</div>



